package com.onlyxiahui.common.action.description.util;

/**
 * Description <br>
 * Date 2020-01-07 18:01:50<br>
 * 
 * @author XiaHui [onlovexiahui@qq.com]<br>
 * @since 1.0.0
 */

public class ActionClassNameUtil {

	public static boolean isPrimitive(String typeName) {
		String type = typeName.contains("java.lang") ? typeName.substring(typeName.lastIndexOf(".") + 1, typeName.length()) : typeName;
		type = type.toLowerCase();
		switch (type) {
		case "integer":
			return true;
		case "int":
			return true;
		case "long":
			return true;
		case "double":
			return true;
		case "float":
			return true;
		case "short":
			return true;
		case "bigdecimal":
			return true;
		case "char":
			return true;
		case "string":
			return true;
		case "boolean":
			return true;
		case "byte":
			return true;
		case "java.sql.timestamp":
			return true;
		case "java.util.date":
			return true;
		case "java.time.localdatetime":
			return true;
		case "localdatetime":
			return true;
		case "localdate":
			return true;
		case "java.time.localdate":
			return true;
		case "java.math.bigdecimal":
			return true;
		case "java.math.biginteger":
			return true;
		default:
			return false;
		}
	}
}
